package com.hkd.system.controller.user;

import com.hkd.common.core.domain.R;
import com.hkd.common.core.domain.TableDataInfo;
import com.hkd.system.domain.user.dto.UserDTO;
import com.hkd.system.domain.user.dto.UserQueryDTO;
import com.hkd.system.service.user.IUserService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@Tag(name = "C端用户管理")
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private IUserService userService;

    @RequestMapping("/list")
    public TableDataInfo list(UserQueryDTO userQueryDTO){
        return userService.list(userQueryDTO);
    }

    @PutMapping("/updateStatus")
    public R updateStatus(@RequestBody UserDTO userDTO){
        return userService.updateStatus(userDTO);
    }
}
